package com.team.olympic.service;

import java.util.List;
import java.sql.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.team.olympic.mapper.MatchMapper;
import com.team.olympic.mapper.WinMatchVoMapper;
import com.team.olympic.pojo.Match;
import com.team.olympic.vo.WinMatchVo;

@Service
public class MatchService {
    @Autowired
    private MatchMapper matchMapper;
    @Autowired
    private WinMatchVoMapper matchVoMapper;

    public List<Match> findAllMatches() {
        return matchMapper.findAllMatches();
    }

    public List<Match> findMatchByDate(Date startDate) {
        return matchMapper.findMatchByDate(startDate);
    }

    public List<WinMatchVo> findMatchVosByMatchId(Long matchId) {
        return matchVoMapper.findMatchVosByMatchId(matchId);
    }

    public List<WinMatchVo> fWinMatchVosByUserId(Long userId) {
        return matchVoMapper.findMatchVosByUserId(userId);
    }

    public List<WinMatchVo> findAllMatchVos() {
        return matchVoMapper.findAllMatchVos();
    }
}
